package com.janj.controller;

import com.janj.bean.Phone;
import com.janj.bean.Student;
import com.janj.service.StudentOnPhoneService;
import com.janj.service.StudentOnPhoneServiceImpl;
import org.junit.Test;

import java.util.List;

public class StudentOnPhoneDemo {

    @Test
    public void testSelectStudentOnPhone() {
        StudentOnPhoneService service = new StudentOnPhoneServiceImpl();
        List<Student> array = service.selectStudentOnPhone();
        System.out.println("----------------------");
        for (Student stu : array) {
            Integer sid = stu.getSid();
            String sname = stu.getSname();
            Integer age = stu.getAge();
            Phone p = stu.getP();
            System.out.println(sid + "," + sname + "," + age + "," + p.getNumber());
        }

    }
}
